import request from "@/utils/request";

export function getAgentList(params) {
  return request({
    url: "back/agent/acquire?type=list",
    method: "get",
    params
  });
}

export function getAgentTeam(params) {
  return request({
    url: "back/agent/acquire?type=team",
    method: "get",
    params
  });
}

export function getAgentDetail(params) {
  return request({
    url: "back/agent/acquire?type=detail",
    method: "get",
    params
  });
}

export function getAgentAvailableUser(params) {
  return request({
    url: "back/agent/acquire?type=user",
    method: "get",
    params
  });
}

export function addAgentUser(data) {
  return request({
    url: "back/agent/acquire?type=insert",
    method: "post",
    data
  });
}

export function getAgentSaleData(params) {
  return request({
    url: "back/agent/acquire?type=statistics",
    method: "get",
    params
  });
}

export function getChooseAgentList(params) {
  return request({
    url: "back/agent/acquire?type=agentList",
    method: "get",
    params
  });
}

export function getAgentOrderList(params) {
  return request({
    url: "back/agent/acquire?type=orderList",
    method: "get",
    params
  });
}

export function getAgentOrderDetail(params) {
  return request({
    url: "back/agent/acquire?type=orderDetails",
    method: "get",
    params
  });
}

export function agentOrderDeliver(data) {
  return request({
    url: "back/agent/acquire?type=allocation",
    method: "post",
    data
  });
}

export function agentOrderShangmen(data) {
  return request({
    url: "back/agent/acquire?type=visiting",
    method: "post",
    data
  });
}

export function getAgentAfterSaleOrderList(params) {
  return request({
    url: "back/agent/acquire?type=after",
    method: "get",
    params
  });
}

export function getAgentEarningList(params) {
  return request({
    url: "back/agent/acquire?type=bonus",
    method: "get",
    params
  });
}

export function getAgentEarningDetail(params) {
  return request({
    url: "back/agent/acquire?type=earnings",
    method: "get",
    params
  });
}

export function getAgentApplyList(params) {
  return request({
    url: "back/agent/acquire?type=applyList",
    method: "get",
    params
  });
}

export function agentApply(data) {
  return request({
    url: "back/agent/acquire?type=apply",
    method: "post",
    data
  });
}
